home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 21
/
AMIGAplus Sonderheft 21 (1999)(ICP)(DE)[!].iso
/
c
/
lzxTOlha
< prev
next >
Wrap
AmigaDOS Script File
|
1999-08-18
|
777b
|
48 lines
.key LZXARCHIVE/A,LHAARCHIVE/A,TEMPDIR/A
.bra {
.ket }
; $VER: "It became Lha" version 1.0 by Jarmo Laakkonen
set tempdir {TEMPDIR}
makedir $tempdir
if warn
echo "Couldn't create directory $tempdir"
quit 5
endif
assign back: ""
lzx x {LZXARCHIVE} $tempdir/
if warn
echo "Couldn't unpack {LZXARCHIVE}
cd $tempdir
delete #? all quiet
cd back:
assign back: remove
quit 5
endif
cd $tempdir
lha a -r back:{LHAARCHIVE} #?
cd back:
delete $tempdir all quiet
;delete #? all quiet
cd back:
assign back: remove
echo "Testing archive {LHAARCHIVE}"
lha t {LHAARCHIVE}
if warn
echo "Problems with archive {LHAARCHIVE}"
echo "Deleting corrupt data"
else
echo "All Done"
ask "*NDo you want to keep {LZXARCHIVE}? (y/N)"
if warn
echo "Ready"
else
delete {LZXARCHIVE}
endif
unset $tempdir